class fan_she(object):
    def __init__(self,name):
        self.name = name
    def talk(self):
        print('%s,is talk'%self.name)

def age(self):
    print('%s is age '%self.name)




obj = fan_she('alex')
s_name = input('please:')
if hasattr(obj,s_name):
   # getattr(obj,s_name)()
    delattr(obj,s_name)
    print(obj.name)
else:
    setattr(obj,s_name,age)
    func = getattr(obj, s_name)
    func(obj)

